﻿Public Class frmItemList

#Region "Overridable Method"

    ''' <summary>
    ''' Thiết lập giá trị khởi tạo cho BusinessObject
    ''' </summary>
    ''' <param name="connectionString">Chuỗi kết nối đến database</param>
    ''' <remarks>Nguyễn Huy Thường added on 04/06/2011</remarks>
    Protected Overrides Sub InitBusinessObject(ByVal connectionString As String)
        MyBase.BusinessObject = New BL.clsItem(connectionString)
    End Sub

    ''' <summary>
    ''' Thiết lập hiển thị form chi tiết dữ liệu
    ''' </summary>
    ''' <returns>frmProductDetail</returns>
    ''' <remarks>Nguyễn Huy Thường added on 27/10/2010</remarks>
    Protected Overrides Function GetFormDetail() As frmBaseDetail
        Dim frmItem As New frmItemDetail
        Return frmItem
    End Function

    ''' <summary>
    ''' Gọi form xem danh sách mặt hàng trong kho
    ''' </summary>
    ''' <remarks>Nguyễn Huy Thường added on 01/06/2012</remarks>
    Protected Overrides Sub ViewList()
        With BusinessObject
            Dim viewProductList As New frmItemListView
            With viewProductList
                .BusinessObject = Me.BusinessObject
                .ReportType = clscommon.ReportType.AvailableItem
                .Owner = Me
                .ShowDialog()
            End With
        End With
    End Sub

    ''' <summary>
    ''' Gọi form in danh sách mặt hàng trong kho
    ''' </summary>
    ''' <remarks>Nguyễn Huy Thường added on 01/06/2012</remarks>
    Protected Overrides Sub PrintList()
        With BusinessObject
            Dim printProductList As New frmItemListPrint
            With printProductList
                .BusinessObject = Me.BusinessObject
                .ReportType = clscommon.ReportType.AvailableItem
                .Owner = Me
                .ShowDialog()
            End With
        End With
    End Sub
#End Region
End Class
